unit U_fm_cadastro;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Menus, Vcl.ImgList, Vcl.ComCtrls,
  Vcl.ToolWin, dxGDIPlusClasses, Vcl.ExtCtrls, Vcl.Imaging.jpeg, cxGraphics,
  cxControls, cxLookAndFeels, cxLookAndFeelPainters, cxContainer, cxEdit,
  dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
  dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
  dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
  dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
  dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
  dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
  dxSkinOffice2010Black, dxSkinOffice2010Blue, dxSkinOffice2010Silver,
  dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
  dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
  dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
  dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, cxLabel,
  Vcl.StdCtrls;

type
  Tfm_cadastro = class(TForm)
    pnl1: TPanel;
    pnl2: TPanel;
    tlb1: TToolBar;
    btn_escola: TToolButton;
    btn_aluno: TToolButton;
    btn_turma: TToolButton;
    btn_professor: TToolButton;
    btn_funcionario: TToolButton;
    btn_disciplinas: TToolButton;
    btn_mensalidade: TToolButton;
    btn_contapagar: TToolButton;
    btn_contareceber: TToolButton;
    btn_fluxo: TToolButton;
    btn_matricula: TToolButton;
    btn_sair: TToolButton;
    btn_relatorio: TToolButton;
    ToolButton11: TToolButton;
    btn_nota: TToolButton;
    btn_avaliacao: TToolButton;
    ilImg_escola: TImageList;
    Image2: TImage;
    btn_lista: TToolButton;
    Label3: TLabel;
    Label1: TLabel;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure btn_sairClick(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure btn_alunoClick(Sender: TObject);
    procedure btn_escolaClick(Sender: TObject);
    procedure btn_notaClick(Sender: TObject);
    procedure btn_turmaClick(Sender: TObject);
    procedure btn_professorClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fm_cadastro: Tfm_cadastro;

implementation

{$R *.dfm}

uses U_fm_aluno, U_fm_dadosempresa, U_fm_nota, U_fm_turma, U_fm_professor,
  Ufm_cadProfessor;



procedure Tfm_cadastro.btn_alunoClick(Sender: TObject);
begin
fm_aluno:=Tfm_aluno.Create(Application);
fm_aluno.ShowModal;
end;

procedure Tfm_cadastro.btn_sairClick(Sender: TObject);
begin
Close;
end;

procedure Tfm_cadastro.btn_turmaClick(Sender: TObject);
begin
fm_turma:=Tfm_turma.Create(Application);
fm_turma.ShowModal;
end;

procedure Tfm_cadastro.FormClose(Sender: TObject; var Action: TCloseAction);
begin
AnimateWindow(Self.Handle, 500, AW_HOR_POSITIVE + AW_HIDE);

end;

procedure Tfm_cadastro.FormShow(Sender: TObject);
var
  r: TRect;
begin
  Borderstyle := bsNone;
  SystemParametersInfo(SPI_GETWORKAREA, 0, @r,0) ;
  SetBounds(r.Left, r.Top, r.Right-r.Left, r.Bottom-r.Top);
  AnimateWindow(Self.Handle, 300, AW_HOR_NEGATIVE);

  begin
    btn_escola.Visible:=True;
    btn_aluno.Visible:=True;
    btn_turma.Visible:=True;
    btn_professor.Visible:=True;
    btn_funcionario.Visible:=True;
    btn_disciplinas.Visible:=True;
    btn_mensalidade.Visible:=False;
    btn_contapagar.Visible:=False;
    btn_contareceber.Visible:=False;
    btn_fluxo.Visible:=False;
    btn_matricula.Visible:=False;
    btn_sair.Visible:=True;
    btn_relatorio.Visible:=True;
    btn_nota.Visible:=False;
    btn_avaliacao.Visible:=False;
    btn_lista.Visible:=False;

  end;





end;

procedure Tfm_cadastro.btn_escolaClick(Sender: TObject);
begin
fm_dadosempresa:=Tfm_dadosempresa.Create(Application);
fm_dadosempresa.ShowModal;
end;

procedure Tfm_cadastro.btn_notaClick(Sender: TObject);
begin
fm_nota:=Tfm_nota.Create(Application);
fm_nota.ShowModal;

end;

procedure Tfm_cadastro.btn_professorClick(Sender: TObject);
begin
fm_professor:=Tfm_professor.Create(Application);
fm_professor.ShowModal;
end;

end.
